package cn.com.spic.demo.service;

import cn.com.spic.demo.dao.ActionProDAO;
import cn.com.spic.demo.po.ActionProjectPO;
import com.yonyou.iuap.baseservice.intg.support.ServiceFeature;
import com.yonyou.iuap.baseservice.service.GenericAssoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import static com.yonyou.iuap.baseservice.intg.support.ServiceFeature.AUDIT;
import static com.yonyou.iuap.baseservice.intg.support.ServiceFeature.I18N_ENUM;

/**
 * 基础CRUD及主子表联合操作服务,分离insert和update 以便RPC权限控制
 *
 * @author zhangxbk
 * 2019/7/26.
 */
@Service
public class ActionProService extends GenericAssoService<ActionProjectPO, String> {

    private Logger logger = LoggerFactory.getLogger(ActionProService.class);

    @Autowired
    private ActionProDAO actionProDAO;


    @Autowired
    public void setActionProDAO(ActionProDAO actionProDAO) {
        this.actionProDAO = actionProDAO;
//        super.setGenericMapper(actionProDAO);
    }

    /**
     * @return 向父类 GenericIntegrateService 提供可插拔的特性声明
     * @CAU 可插拔设计
     */
    @Override
    protected ServiceFeature[] getFeats() {
        return new ServiceFeature[]{AUDIT, I18N_ENUM};
    }


}
